package com.itheima.reggie;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.reggie.entity.Dish;
import com.itheima.reggie.service.DishService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;
import java.util.Map;

@SpringBootTest
class testSelect {

	@Autowired
	private DishService dishService;

	@Test
	void contextLoads() {
		LambdaQueryWrapper<Dish> dishLambdaQueryWrapper = new LambdaQueryWrapper<>();
		//添加查询条件，根据分类id进行查询
		dishLambdaQueryWrapper.eq(Dish::getCategoryId,1397844263642378242L);
		List<Map<String, Object>> list = dishService.listMaps(dishLambdaQueryWrapper);
		System.out.println(list);
	}

}
